package com.yunlc.kubernetes.traefik.models;

import com.google.gson.annotations.SerializedName;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;

public class TraefikV1alpha1IngressRouteService {

    @SerializedName("kind")
    private String kind = null;

    @SerializedName("name")
    private String name = null;

    @SerializedName("namespace")
    private String namespace = null;

    @SerializedName("port")
    private Integer port = null;

    public TraefikV1alpha1IngressRouteService kind(String kind) {
        this.kind = kind;
        return this;
    }

    @ApiModelProperty(value = "kind")
    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public TraefikV1alpha1IngressRouteService name(String name) {
        this.name = name;
        return this;
    }

    @ApiModelProperty(value = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public TraefikV1alpha1IngressRouteService namespace(String namespace) {
        this.namespace = namespace;
        return this;
    }

    @ApiModelProperty(value = "namespace")
    public String getNamespace() {
        return namespace;
    }

    public void setNamespace(String namespace) {
        this.namespace = namespace;
    }

    public TraefikV1alpha1IngressRouteService port(Integer port) {
        this.port = port;
        return this;
    }

    @ApiModelProperty(value = "port")
    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        TraefikV1alpha1IngressRouteService routeService = (TraefikV1alpha1IngressRouteService) o;
        return Objects.equals(this.kind, routeService.kind) &&
                Objects.equals(this.name, routeService.name) &&
                Objects.equals(this.namespace, routeService.namespace) &&
                Objects.equals(this.port, routeService.port);
    }

    @Override
    public int hashCode() {
        return Objects.hash( kind, name, namespace, port);
    }


    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class TraefikV1alpha1IngressRouteService {\n");

        sb.append("    kind: ").append(toIndentedString(kind)).append("\n");
        sb.append("    name: ").append(toIndentedString(name)).append("\n");
        sb.append("    namespace: ").append(toIndentedString(namespace)).append("\n");
        sb.append("    port: ").append(toIndentedString(port)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /**
     * Convert the given object to string with each line indented by 4 spaces
     * (except the first line).
     */
    private String toIndentedString(Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }

}
